﻿<UserControl x:Class="Gao.Poker.App.Game.EndContestView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d">
    <Grid Margin="5">
        <Grid.RowDefinitions>
            <RowDefinition Height="50"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="50"/>
        </Grid.RowDefinitions>
        <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="0" Text="{Binding Path=Competition.Name}"
                   FontSize="32" FontWeight="Bold"/>

        <DataGrid Grid.Row="1" Margin="1,1,1,1" RowHeight="30" Name="dgRight"  AutoGenerateColumns="False"
                  SelectionMode="Single" 
                  AlternatingRowBackground="#FFF9CFCF" AlternationCount="2" CanUserAddRows="False"
                  ItemsSource="{Binding Path=Rankings}"
                  FontSize="16">
            <DataGrid.Columns>
                <DataGridTextColumn IsReadOnly="True" Header="会员卡号" Width="120" Binding="{Binding Path=CardNo, Mode=TwoWay}"/>
                <DataGridTextColumn IsReadOnly="True" Header="会员名" Width="*" Binding="{Binding Path=Name, Mode=TwoWay}"/>
                <DataGridTextColumn Header="名次" Width="80" Binding="{Binding Path=Rank, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
            </DataGrid.Columns>
        </DataGrid>

        <StackPanel Orientation="Horizontal"  Grid.Row="3" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Center">
            <Button Padding="5" Style="{DynamicResource Orrange}" Width="60" FontSize="16" Height="35" Name="btnLogin" 
                    Click="Confirm_Click">确定</Button>
        </StackPanel>
    </Grid>
</UserControl>
